import api from '@/utils/request.js'
const apiRoot = process.env.apiBaseUrl;
console.log(`现在是${process.env.NODE_ENV}环境：域名：${apiRoot}`);
const request = {};

request.login = (data) => {
  return api.post(`${apiRoot}etc/login`, data)
};

request.getInfo = () => {
  return api.get(`${apiRoot}etc/system/user/getUserInfo`)
};

request.checkSession = () => {
  return api.post(`${apiRoot}/etc/checkSession`)
};

// 获取审核俱乐部列表
request.getClubMemberList = (data) => {
  return api.post(`${apiRoot}etc/etcClubMember/getClubMemberList`, data)
};
// 俱乐部审核通过
request.clubMemberPass = (data) => {
  return api.post(`${apiRoot}etc/etcClubMember/etcClubMemberPass`, data)
};
// 俱乐部审核通过
request.clubMemberFaild = (data) => {
  return api.post(`${apiRoot}etc/etcClubMember/etcClubMemberFailed`, data)
};
//提现审核列表
request.getMoneyList = (data) => {
  return api.post(`${apiRoot}etc/GetMoney/getMoneyList`, data)
};
// 获取所有的推广记录
request.getPromoItemList = (data) => {
  return api.post(`${apiRoot}etc/GetMoney/getPromoItemList`, data)
};
// 提现是否通过
request.getMoneyExamine = (data) => {
  return api.post(`${apiRoot}etc/GetMoney/getMoneyExamine`, data)
};
// 设备管理
request.orderList = (data) => {
  return api.post(`${apiRoot}etc/etcInfo/newlist`, data)
};
// 退款
request.refund = (data) => {
  return api.post(`${apiRoot}etc/etcInfo/refund`, data)
};
// 修改订单状态
request.editNewOrder = (data) => {
  return api.post(`${apiRoot}etc/etcInfo/edit-new`, data)
};
// 核审详细资料
request.etcInfoData = (data) => {
  return api.post(`${apiRoot}etc/etcInfo/etcInfoData`, data)
};
// 修改详细资料
request.updateEtcInfoData = (data) => {
  return api.post(`${apiRoot}etc/etcInfo/updateEtcInfoData`, data, 'application/json;charset=UTF-8')
};
// 核审详细资料
request.examinEtcInfo = (data) => {
  return api.post(`${apiRoot}etc/etcInfo/examinEtcInfo`, data)
};
// 查询省份信息
request.queryProvincesNew = () => {
  return api.post(`${apiRoot}etc//city/queryProvincesNew`)
};
// 查询地区信息
request.queryCitiesNew = (data) => {
  return api.post(`${apiRoot}etc//city/queryCitiesNew`, data)
};
// 查询地区信息
request.queryAreasNew = (data) => {
  return api.post(`${apiRoot}etc//city/queryAreasNew`, data)
};


export default request;
